package com.meizi.experimentcode.dsl;

import lombok.Data;

/**
 * @author Administration
 * @date 2022/3/10 - 11:22 - 星期四
 * @project lambda
 * @package com.meizi.experimentcode.dsl
 * @by 晨
 */
@Data
public class TradeBuilder {

    public Trade trade = new Trade();

    public TradeBuilder quantity (int quantity) {
        trade.setQuantity(quantity);
        return this;
    }

    public TradeBuilder at (double price) {
        trade.setPrice(price);
        return this;
    }

    public StockBuilder stock (String symbol) {
        return new StockBuilder(this, trade, symbol);
    }
}
